<?php 
  class MenuViewModel extends ViewModel{
  	public $table = 'menu';

	 public $view =array(
	 		'menu' => array(
	 			'_type' => 'INNER'
	 			),
			'shop' => array(
				 '_on'  => '__menu__.mid=__shop__.mid',
				 '_type' => 'INNER'
			)
			
        );
	 public function get_data($where=NULL){
	 	return $this->where($where)->all();

	 }

	 public function get_one_data($where=NULL){
	 	return $this->where($where)->find();

	 }
  }



 ?>